/**
 * Created by YMP on 2019/10/22.
 */
import Taro from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import { AtIcon, AtButton } from 'taro-ui'
import XtNavBar from '@components/common/XtNavBar'
import BaseComponent from '@components/common/BaseComponent'
import Tips from '@utils/tips'
import Pulltopushrefresh from '@components/common/pullToPushRefresh'
import './index.scss'

export default class index extends BaseComponent {
  state = {}

  componentWillMount() {}

  componentDidMount() {}

  componentWillUnmount() {}

  componentDidShow() {}

  componentDidHide() {}
  clickEmpty() {
    Tips.toast('点击了empty')
  }
  PullDown(callback) {
    console.log('pulldown')
    callback()
  }
  loadMore(callback) {
    callback('noMore')
  }
  render() {
    return (
      <View className='index'>
        <XtNavBar></XtNavBar>
        <Pulltopushrefresh style={{ height: '100vh' }} onPullDown={this.PullDown} onLoadMore={this.loadMore}>
          <Text className='icon icon--search'></Text>
          <View className='at-icon at-icon-settings'></View>
          <View className='icon icon--close'></View>

          <AtIcon prefixClass='icon' value='-weixinx' size='30' color='#F00'></AtIcon>
          <AtIcon prefixClass='icon' value='shengchenghaibao' size='30' color='#F00'></AtIcon>
          <AtIcon prefixClass='icon' value='xiaoxi' size='30' color='#F00'></AtIcon>

          <AtButton loading type='primary' customStyle={{ marginTop: Taro.pxTransform(10) }}>
            按钮文案
          </AtButton>
        </Pulltopushrefresh>
      </View>
    )
  }
}
